package com.wheel.autoconfigure.drools;

import org.kie.api.KieServices;
import org.kie.api.runtime.KieContainer;
import org.springframework.beans.factory.FactoryBean;

public class KieContainerFactoryBean implements FactoryBean {

    protected KieContainer container;

    public void setContainer(KieContainer container) {
        this.container = container;
    }

    public Object getObject() throws Exception {
        return container;
    }

    public Class<? extends KieContainer> getObjectType() {
        return KieContainer.class;
    }

    public boolean isSingleton() {
        return true;
    }
}